Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created routing utilities subdirectory in cirq-core/transformers and added MappingManager module #5823

Merged
merged 14 commits into from
Aug 15, 2022

Conversation

ammareltigani
Copy link
Contributor

@ammareltigani ammareltigani commented Aug 10, 2022

This PR is the first in a series to implement qubit routing capabilities in Cirq. It
(1) creates a new subdirectory in cirq-core/transformers named 'routing' where all qubit routing utilities will live
(2) implements a class MappingManager that will serve to keep track of the mapping of logical to physical qubits during a routing process

For more context, see http://tinyurl.com/cirq-qubit-routing

@ammareltigani ammareltigani requested review from a team, vtomole and cduck as code owners August 10, 2022 23:33
@ammareltigani ammareltigani requested a review from viathor August 10, 2022 23:34
@CirqBot CirqBot added the size: M 50< lines changed <250 label Aug 10, 2022
@tanujkhattar tanujkhattar self-assigned this Aug 10, 2022
Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Left a first round of comments.

cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
cirq-core/cirq/transformers/routing/mapping_manager.py Outdated Show resolved Hide resolved
@vtomole
Copy link
Collaborator

vtomole commented Aug 11, 2022

For more context, see http://tinyurl.com/cirq-qubit-routing

I don't have access to this. Just requested.

@ammareltigani
Copy link
Contributor Author

ammareltigani commented Aug 11, 2022

I don't have access to this. Just requested.

Sorry @vtomole ! Just shared it with you.

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good. One last round of comments, mostly around improving docstrings.

@mpharrigan Do you want to take a look as well?

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
@ammareltigani ammareltigani marked this pull request as draft August 12, 2022 20:57
@ammareltigani ammareltigani marked this pull request as ready for review August 12, 2022 20:57
@tanujkhattar tanujkhattar merged commit 4a64b1e into quantumlib:master Aug 15, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
…added MappingManager module (quantumlib#5823)

* created routing utilities in cirq-core/transformers and added MappingManager module

* ran continuous integration checks

* addressed first round of comments

* typo

* remove unused distance matrix

* updated shortest_path method

* formatting

* minor bug fix

* made changes to docstring

* minor docstring fixes; shortest_path() now returns logical qubits instead of physical qubits

* nit

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
…added MappingManager module (quantumlib#5823)

* created routing utilities in cirq-core/transformers and added MappingManager module

* ran continuous integration checks

* addressed first round of comments

* typo

* remove unused distance matrix

* updated shortest_path method

* formatting

* minor bug fix

* made changes to docstring

* minor docstring fixes; shortest_path() now returns logical qubits instead of physical qubits

* nit

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants